FROM webdevops/php-nginx:7.4-alpine

MAINTAINER k23223 <23223856@qq.com>

RUN apk add --no-cache mysql mysql-client tree

COPY conf/nginx.conf /opt/docker/etc/nginx/vhost.common.d/10-location-root.conf

COPY conf/bin/ /opt/docker/bin/

COPY conf/etc/ /opt/docker/etc/

COPY conf/provision/ /opt/docker/provision/

COPY conf/my.cnf /etc/my.cnf

RUN mkdir -p /run/mysqld && mkdir -p /dbinit.d

ENV php.short_open_tag On

COPY ./ /app

RUN chown application:application -R /app/

WORKDIR /db

VOLUME /db

EXPOSE 3306
